home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mtgrap1c / demo10.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-06  |  2.0 KB  |  85 lines

  1. /*                                                            
  2.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  3.   ▒                                                          ▒
  4.   ▒                                                          ▒
  5.   ▒             Neuromancer's Graphics Library               ▒
  6.   ▒                     Version 1.0c                         ▒
  7.   ▒                                                          ▒
  8.   ▒   This program demonstrates the font routines.           ▒
  9.   ▒                                                          ▒ 
  10.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  11.   ▒                                                          ▒
  12.   ▒     Project:    MTLIB01.LIB                              ▒
  13.   ▒                 DEMO10.CPP                               ▒
  14.   ▒                                                          ▒ 
  15.   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  16. */
  17.  
  18. #include <iostream.h>
  19. #include <stdlib.h>
  20. #include <conio.h>
  21. #include <dos.h>
  22. #include <string.h>
  23. #include "video.h"
  24. #include "fonts.h"
  25. #include "palette.h"
  26.  
  27.  
  28. FONT **font;
  29.  
  30. void main(int argc, char *argv[])
  31. {
  32.     byte palette[768];
  33.     char name[13];
  34.  
  35.     mtSetVGAMode();            //Set up VGA Mode
  36.     mtClrScr(25);
  37.  
  38.     if (argc != 2)
  39.     {
  40.         strcpy(name,"default.fon");
  41.     }
  42.     else
  43.     {
  44.         strcpy(name,argv[1]);
  45.     }    
  46.     
  47.     if ((font=mtLoadFont(name))==NULL)
  48.     {
  49.         mtSetTextMode();
  50.         cout << "Error!!!" << endl;
  51.         exit(0);
  52.     }
  53.  
  54.     mtSetColor(45);
  55.     mtPrintStr(10,10,"!\"#$%&'()*+,-./",font);
  56.     mtSetColor(14);
  57.     mtPrintStr(10,20,"0123456789:;<=>?@",font);
  58.     mtSetColor(56);
  59.     mtPrintStr(10,30,"ABCDEFGHIJKLMNOPQRSTUVWXYZ",font);
  60.     mtSetColor(152);    
  61.     mtPrintStr(10,40,"[\\]^_`",font);
  62.     mtSetColor(51);    
  63.     mtPrintStr(10,50,"abcdefghijklmnopqrstuvwxyz",font);
  64.     mtSetColor(35);    
  65.     mtPrintStr(10,60,"{|}~",font);
  66.  
  67.     getch();
  68.  
  69.     mtSetTextMode();
  70.  
  71.     mtFreeFont(font);
  72.  
  73.     cout << "Thank you for using the library!" << endl;
  74.  
  75.     exit(0);
  76.     
  77. }
  78.  
  79.            
  80.             
  81.  
  82.            
  83.  
  84.            
  85.